<{include file='../include/header.html'}>

<div class="layui-fluid">
	<div class="layui-row layui-col-space15">
		<div class="layui-col-sm6 layui-col-md4">
			<div class="layui-card">
				<div class="layui-card-header">
					帖子
					<span class="layui-badge layui-bg-blue layuiadmin-badge">今日</span>
				</div>
				<div class="layui-card-body layuiadmin-card-list">
					<p class="layuiadmin-big-font"><{$data.thread.today}></p>
					<p>
						总帖子数 
						<span class="layuiadmin-span-color"><{$data.thread.total}> <i class="layui-inline layui-icon layui-icon-flag"></i></span>
					</p>
				</div>
			</div>
		</div>
		<div class="layui-col-sm6 layui-col-md4">
			<div class="layui-card">
				<div class="layui-card-header">
					评论
					<span class="layui-badge layui-bg-cyan layuiadmin-badge">今日</span>
				</div>
				<div class="layui-card-body layuiadmin-card-list">
					<p class="layuiadmin-big-font"><{$data.comment.today}></p>
					<p>
						总评论数
						<span class="layuiadmin-span-color"><{$data.comment.total}> <i class="layui-inline layui-icon layui-icon-face-smile-b"></i></span>
					</p>
				</div>
			</div>
		</div>
		<!-- <div class="layui-col-sm6 layui-col-md3"> -->
			<!-- <div class="layui-card"> -->
				<!-- <div class="layui-card-header"> -->
					<!-- 访问量 -->
					<!-- <span class="layui-badge layui-bg-green layuiadmin-badge">今日</span> -->
				<!-- </div> -->
				<!-- <div class="layui-card-body layuiadmin-card-list"> -->
<!--  -->
					<!-- <p class="layuiadmin-big-font"><{$data.user.today}></p> -->
					<!-- <p> -->
						<!-- 总访问量 -->
						<!-- <span class="layuiadmin-span-color"><{$data.user.total}> <i class="layui-inline layui-icon layui-icon-dollar"></i></span> -->
					<!-- </p> -->
				<!-- </div> -->
			<!-- </div> -->
		<!-- </div> -->
		<div class="layui-col-sm12 layui-col-md4">
			<div class="layui-card">
				<div class="layui-card-header">
					新用户
					<span class="layui-badge layui-bg-orange layuiadmin-badge">今日</span>
				</div>
				<div class="layui-card-body layuiadmin-card-list">

					<p class="layuiadmin-big-font"><{$data.user.today}></p>
					<p>
						总用户数
						<span class="layuiadmin-span-color"><{$data.user.total}> <i class="layui-inline layui-icon layui-icon-user"></i></span>
					</p>
				</div>
			</div>
		</div>
		<div class="layui-col-sm12">
			<div class="layui-card">
				<div class="layui-card-header">
					7天内用户增长数据
				</div>
				<div class="layui-card-body" id="user_7days" style="width:100%;height:300px;"></div>
			</div>
		</div>
		<div class="layui-col-sm12">
			<div class="layui-card">
				<div class="layui-card-header">
					7天内主题评论增长数据
				</div>
				<div class="layui-card-body" id="data_7days" style="width:100%;height:300px;"></div>
			</div>
		</div>
	</div>
</div>

<script src="<{URL}>static/js/echarts.js"></script>
<script>
var myChart = echarts.init(document.getElementById('user_7days'));
var option = {
	title: {
		text: '折线图'
	},
	tooltip: {},
	xAxis: {
		data: ["<{date('Y-m-d',strtotime('today - 6 day'))}>","<{date('Y-m-d',strtotime('today - 5 day'))}>","<{date('Y-m-d',strtotime('today - 4 day'))}>","<{date('Y-m-d',strtotime('today - 3 day'))}>","<{date('Y-m-d',strtotime('today - 2 day'))}>","<{date('Y-m-d',strtotime('today - 1 day'))}>","<{date('Y-m-d',strtotime('today'))}>"]
	},
	legend:{
		data:['增长数']
	},
	yAxis: {},
	series: [{
		name: '增长数',
		type: 'line',
		data: [<{$data.user.7days.0}>, <{$data.user.7days.1}>, <{$data.user.7days.2}>, <{$data.user.7days.3}>, <{$data.user.7days.4}>, <{$data.user.7days.5}>, <{$data.user.7days.6}>]
	}]
};

myChart.setOption(option);

myChart = echarts.init(document.getElementById('data_7days'));
option.series = [{
	name: '主题增长数',
		type: 'line',
		data: [<{$data.thread.7days.0}>, <{$data.thread.7days.1}>, <{$data.thread.7days.2}>, <{$data.thread.7days.3}>, <{$data.thread.7days.4}>, <{$data.thread.7days.5}>, <{$data.thread.7days.6}>]
},{
	name: '评论增长数',
		type: 'line',
		data: [<{$data.comment.7days.0}>, <{$data.comment.7days.1}>, <{$data.comment.7days.2}>, <{$data.comment.7days.3}>, <{$data.comment.7days.4}>, <{$data.comment.7days.5}>, <{$data.comment.7days.6}>]
}];
option.legend = {
	data:['主题增长数','评论增长数']
};
myChart.setOption(option);
</script>

<{include file='../include/footer.html'}>